<?php

class HotWidget  extends CWidget
{

	public function init()
	{
		parent::init();
	}

	public function run()
	{
		$articlelist = Yii::app()->db->createCommand()
				->select('a.id,a.title,a.createtime,a.pic')
				->from('edu_article a')
				->where('status=:status',array(':status'=>200))
				->order('views  desc,createtime desc')
				->limit(10)
				->queryAll();
		$this->render("hot",array("articlelist"=>$articlelist));
	}
}

?>